#ifndef SHAPES_H_INCLUDED
#define SHAPES_H_INCLUDED

/**
 *
 * \file shapes.cpp
 * \brief This file contains shapes classes declaration.
 * \author Vladimir Klubkov (aka marked)
 *
 * Last changes date:
 * \date 05.03.2011
 *
 * Copyright 2011 Vladimir Klubkov <marked-one@yandex.ru>
 *
 * This file is part of OOXlib.
 *
 * OOXLib is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * OOXlib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with OOXlib; if not, you can try to find  it here:
 * http://www.gnu.org/licenses/gpl.txt
 * or write to the Free Software Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA  02111-1307  USA
 *
 */

namespace OOXlib {
/**
 * \class CUInt2dPoint
 * Datatype to save the 2d position, two unsigned integer values: X and Y coordinates.
 */
class CUInt2dPoint {
public:
// Constructors.
    CUInt2dPoint();
    CUInt2dPoint(const unsigned int iX, const unsigned int iY);
// Getters.
    unsigned int GetX() const;
    unsigned int GetY() const;
    void SetX(const unsigned int iX);
    void SetY(const unsigned int iY);
// Setters.
    void Set(const unsigned int iX, const unsigned int iY);
private:
    unsigned int m_iX;
    unsigned int m_iY;
};
/**
 * \class CInt2dPoint
 * Datatype to save the 2d position, two integer values: X and Y coordinates.
 */
class CInt2dPoint {
public:
// Constructors.
    CInt2dPoint();
    CInt2dPoint(const int iX, const int iY);
// Getters.
    int GetX() const;
    int GetY() const;
    void SetX(const int iX);
    void SetY(const int iY);
// Setters.
    void Set(const int iX, const int iY);
private:
    int m_iX;
    int m_iY;
};
/**
 * \typedef CUInt2dSize
 * Another name for CUInt2dPoint class.
 * Datatype to save 2d sizes, two unsigned integer values: X and Y sizes.
 */
typedef CUInt2dPoint CUInt2dSize;
/**
 * \typedef CInt2dSize
 * Another name for CInteger2dPoint class.
 * Datatype to save 2d sizes, two integer values: X and Y sizes.
 */
typedef CInt2dPoint CInt2dSize;
/**
 * \class CUInt2dLine
 * Datatype to save the 2d line, four unsigned integer values: X and Y coordinates
 * of the start and of the end of the line.
 */
class CUInt2dLine {
public:
// Constructors.
    CUInt2dLine();
    CUInt2dLine(const unsigned int iStartX, const unsigned int iStartY, const unsigned int iEndX, const unsigned int iEndY);
    CUInt2dLine(const CUInt2dPoint &Start, const CUInt2dPoint &End);
// Getters.
    unsigned int GetStartX() const;
    unsigned int GetStartY() const;
    unsigned int GetEndX() const;
    unsigned int GetEndY() const;
    CUInt2dPoint GetStart() const;
    CUInt2dPoint GetEnd() const;
    CUInt2dSize GetSize() const;
// Setters.
    void SetStartX(const unsigned int iStartX);
    void SetStartY(const unsigned int iStartY);
    void SetEndX(const unsigned int iEndX);
    void SetEndY(const unsigned int iEndY);
    void SetStart(const unsigned int iStartX, const unsigned int iStartY);
    void SetEnd(const unsigned int iEndX, const unsigned int iEndY);
    void SetStart(const CUInt2dPoint &Start);
    void SetEnd(const CUInt2dPoint &End);
    void Set(const unsigned int iStartX, const unsigned int iStartY, const unsigned int iEndX, const unsigned int iEndY);
    void Set(const CUInt2dPoint &Start, const CUInt2dPoint &End);
private:
    unsigned int m_iStartX;
    unsigned int m_iStartY;
    unsigned int m_iEndX;
    unsigned int m_iEndY;
};
/**
 * \class CInt2dLine
 * Datatype to save the 2d line, four integer values: X and Y coordinates
 * of the start and of the end of the line.
 */
class CInt2dLine {
public:
// Constructors.
    CInt2dLine();
    CInt2dLine(const int iStartX, const int iStartY, const int iEndX, const int iEndY);
    CInt2dLine(const CInt2dPoint &Start, const CInt2dPoint &End);
// Getters.
    int GetStartX() const;
    int GetStartY() const;
    int GetEndX() const;
    int GetEndY() const;
    CInt2dPoint GetStart() const;
    CInt2dPoint GetEnd() const;
    CInt2dSize GetSize() const;
// Setters.
    void SetStartX(const int iStartX);
    void SetStartY(const int iStartY);
    void SetEndX(const int iEndX);
    void SetEndY(const int iEndY);
    void SetStart(const int iStartX, const int iStartY);
    void SetEnd(const int iEndX, const int iEndY);
    void SetStart(const CInt2dPoint &Start);
    void SetEnd(const CInt2dPoint &End);
    void Set(const int iStartX, const int iStartY, const int iEndX, const int iEndY);
    void Set(const CInt2dPoint &Start, const CInt2dPoint &End);
private:
    int m_iStartX;
    int m_iStartY;
    int m_iEndX;
    int m_iEndY;
};
/**
 * \class CUInt2dRectangle
 * Datatype to save the 2d rectangle, four unsigned integer values: X and Y coordinates
 * of the left top corner and width and height of the rectangle.
 */
class CUInt2dRectangle {
public:
// Constructors.
    CUInt2dRectangle();
    CUInt2dRectangle(const unsigned int iX, const unsigned int iY, const unsigned int iWidth, const unsigned int iHeight);
    CUInt2dRectangle(const CUInt2dPoint &Position, const CUInt2dSize &Size);
// Getters.
    unsigned int GetPositionX() const;
    unsigned int GetPositionY() const;
    unsigned int GetWidth() const;
    unsigned int GetHeight() const;
    CUInt2dPoint GetPosition() const;
    CUInt2dSize GetSize() const;
// Setters.
    void SetPositionX(const unsigned int iX);
    void SetPositionY(const unsigned int iY);
    void SetWidth(const unsigned int iWidth);
    void SetHeight(const unsigned int iHeight);
    void SetPosition(const unsigned int iX, const unsigned int iY);
    void SetSize(const unsigned int iWidth, const unsigned int iHeight);
    void SetPosition(const CUInt2dPoint &Position);
    void SetSize(const CUInt2dPoint &Size);
    void Set(const unsigned int iX, const unsigned int iY, const unsigned int iWidth, const unsigned int iHeight);
    void Set(const CUInt2dPoint &Position, const CUInt2dSize &Size);
private:
    unsigned int m_iX;
    unsigned int m_iY;
    unsigned int m_iWidth;
    unsigned int m_iHeight;
};
/**
 * \class CInt2dRectangle
 * Datatype to save the 2d rectangle, four integer values: X and Y coordinates
 * of the left top corner and width and height of the rectangle.
 */
class CInt2dRectangle {
public:
// Constructors.
    CInt2dRectangle();
    CInt2dRectangle(const int iX, const int iY, const int iWidth, const int iHeight);
    CInt2dRectangle(const CInt2dPoint &Position, const CInt2dSize &Size);
// Getters.
    int GetPositionX() const;
    int GetPositionY() const;
    int GetWidth() const;
    int GetHeight() const;
    CInt2dPoint GetPosition() const;
    CInt2dSize GetSize() const;
// Setters.
    void SetPositionX(const int iX);
    void SetPositionY(const int iY);
    void SetWidth(const int iWidth);
    void SetHeight(const int iHeight);
    void SetPosition(const int iX, const int iY);
    void SetSize(const int iWidth, const int iHeight);
    void SetPosition(const CInt2dPoint &Position);
    void SetSize(const CInt2dPoint &Size);
    void Set(const int iX, const int iY, const int iWidth, const int iHeight);
    void Set(const CInt2dPoint &Position, const CInt2dSize &Size);
private:
    int m_iX;
    int m_iY;
    int m_iWidth;
    int m_iHeight;
};

} // OOXlib

#endif // SHAPES_H_INCLUDED
